import 'dart:convert';



class BindModelResult {
  int? currentPage;
  int? pageSize;
  int? totalNum;
  int? isMore;
  int? totalPage;
  int? startIndex;
  List<BindModel>? items;

  BindModelResult({this.currentPage,
    this.pageSize,
    this.totalNum,
    this.isMore,
    this.totalPage,
    this.startIndex,
    this.items});

  BindModelResult.fromJson(Map<String, dynamic> json) {
    currentPage = json['currentPage'];
    pageSize = json['pageSize'];
    totalNum = json['totalNum'];
    isMore = json['isMore'];
    totalPage = json['totalPage'];
    startIndex = json['startIndex'];
    if (json['items'] != null) {
      items = <BindModel>[];
      json['items'].forEach((v) {
        items!.add(new BindModel.fromJson(v));
      });
    }else{
      items = [];
    }
  }
}


class BindModel {
  String? macAddr;
  int? channelId;
  int? parkingSpaceId;
  int? bindType;
  int? deviceType;
  String? deviceTypeName;
  int? index;
  int? areaId;
  int? parkingSpaceStatus;
  int? parkingId;
  int? fireEquipmentId;
  int? id;
  int? enterpriseId;
  int? deviceId;
  String? createTime;
  String? spaceName;

  bool? select;
  BindModel({this.macAddr, this.channelId,this.parkingSpaceId,this.bindType,this.deviceType,
    this.index,this.areaId,this.parkingSpaceStatus,this.parkingId,this.fireEquipmentId,
    this.id,this.enterpriseId,this.deviceId,this.select=false,this.createTime,this.spaceName,this.deviceTypeName
  });

  BindModel.fromJson(Map<String, dynamic> jsonData) {
    macAddr = jsonData['macAddr'];
    channelId = jsonData['channelId'];
    bindType = jsonData['bindType'];
    deviceType = jsonData['deviceType'];
    index = jsonData['index'];
    areaId = jsonData['areaId'];
    parkingSpaceStatus = jsonData['parkingSpaceStatus'];
    parkingSpaceId = jsonData['parkingSpaceId'];
    createTime = jsonData['createTime'];
    parkingId = jsonData['parkingId'];
    spaceName = jsonData['spaceName'];
    fireEquipmentId = jsonData['fireEquipmentId'];
    // print( jsonData['parkingSpaceName']);
    select = false;
    id = jsonData['id'];
    enterpriseId = jsonData['enterpriseId'];

    deviceId  = jsonData['deviceId'];

  }
}
